home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 4 / Mac Giga-ROM 4.0 - 1993.toast / FILES / HYP / J-M / MenuLaunch Stack1.2b.cpt / MenuLaunch Stack1.2b / background_2777.txt < prev    next >
Text File  |  1989-02-26  |  8KB  |  306 lines

  1. -- background: 2777 from stack: in.2b
  2. -- bmap block id: 3700
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7.  
  8. on openStack
  9.   hide MenuBar
  10.  
  11.   hide message
  12.   global whenOpened
  13.   if whenOpened is empty then
  14.     put the date into whenOpened
  15.     answer "Please print this!" with "Print" or "Cancel"
  16.     if it is "Print" then
  17.       doMenu "Print Report..."
  18.     end if
  19.   end if
  20. end openStack
  21.  
  22. on exitStack
  23.   show MenuBar
  24. end exitStack
  25.  
  26.  
  27. -- part 3 (button)
  28. -- low flags: 00
  29. -- high flags: A004
  30. -- rect: left=140 top=307 right=323 bottom=345
  31. -- title width / last selected line: 0
  32. -- icon id / first selected line: 0 / 0
  33. -- text alignment: 1
  34. -- font id: 0
  35. -- text size: 12
  36. -- style flags: 0
  37. -- line height: 16
  38. -- part name: MenuLaunch
  39. ----- HyperTalk script -----
  40. on mousedown
  41.   push card
  42.   visual dissolve to gray
  43.   visual dissolve
  44.   put the mouseloc into menuLoc
  45.   put item 1 of menuLoc - -10 into horiz
  46.   put item 2 of menuLoc - 290 into vert
  47.   get PopUpMenu("WriteNow;MacWrite;MockWrite;TeachText;Edit;"& "(-;MacDraw 1.9;FullPaint;SuperPaint;(-;MacCalc;MORE‚Ñ¢;"& "(-;Red Ryder 10.3;StuffIt 1.20;PackIt III;"& "(-;Open other;Open Stack", 0, vert, horiz)
  48.   put it into choice
  49.   set hilite of target to false
  50.   if choice = "0" then exit mousedown
  51.  
  52.   if choice = "1" then open "CMS Hard Disk:Word Processors:WriteNow"
  53.  
  54.   if choice = "2" then open "CMS Hard Disk:Word Processors:MacWrite"
  55.  
  56.  
  57.   -- this one activates the "MockWrite" DA.Any DA can be used like this.
  58.   -- useful for Stacks w/ no menubar
  59.   if choice = "3" then doMenu "MockWrite"
  60.  
  61.   if choice = "4" then open "CMS Hard Disk:Word Processors:TeachText"
  62.  
  63.   if choice = "5" then open "CMS Hard Disk:Word Processors:Edit"
  64.  
  65.   if choice = "7" then open "CMS Hard Disk:Graphics:MacDraw 1.9"
  66.  
  67.   if choice = "8" then open "CMS Hard Disk:Graphics:FullPaint"
  68.  
  69.   if choice = "9" then open "CMS Hard Disk:Graphics:SuperPaint"
  70.  
  71.   if choice = "11" then open "CMS Hard Disk:Business Applications:MacCalc"
  72.  
  73.   if choice = "12" then open "CMS Hard Disk:Business Applications:MORE‚Ñ¢"
  74.  
  75.   if choice = "14" then open "CMS Hard Disk:Comm. Δíolder:Red's Δíolder:Red Ryder 10.3"
  76.  
  77.   if choice = "15" then open "CMS Hard Disk:Comm. Δíolder:.SIT.PIT Stuff:StuffIt 1.20"
  78.  
  79.   if choice = "16" then open "CMS Hard Disk:Comm. Δíolder:.SIT.PIT Stuff:PackIt III"
  80.  
  81.   if choice = "18" then
  82.     global theFile
  83.     put FileName("APPL") into theFile
  84.     if theFile is not empty then
  85.       visual effect dissolve
  86.       open theFile
  87.     end if
  88.   end if
  89.  
  90.   if choice = "19" then doMenu "Open Stack..."
  91.  
  92. end mousedown
  93.  
  94.  
  95.  
  96.  
  97. -- part 5 (field)
  98. -- low flags: 01
  99. -- high flags: 2007
  100. -- rect: left=15 top=90 right=280 bottom=493
  101. -- title width / last selected line: 0
  102. -- icon id / first selected line: 0 / 0
  103. -- text alignment: 0
  104. -- font id: 4
  105. -- text size: 12
  106. -- style flags: 0
  107. -- line height: 16
  108. -- part name: Instructions
  109.  
  110.  
  111. -- part 6 (button)
  112. -- low flags: 00
  113. -- high flags: A000
  114. -- rect: left=284 top=308 right=321 bottom=343
  115. -- title width / last selected line: 0
  116. -- icon id / first selected line: 0 / 0
  117. -- text alignment: 1
  118. -- font id: 0
  119. -- text size: 12
  120. -- style flags: 0
  121. -- line height: 16
  122. -- part name: Stacks
  123. ----- HyperTalk script -----
  124. on mousedown
  125.   push card
  126.   visual dissolve to white
  127.   visual dissolve fast to gray
  128.   visual dissolve fast to white
  129.   visual dissolve
  130.   put the mouseloc into menuLoc
  131.   put item 1 of menuLoc - -10 into horiz
  132.   put item 2 of menuLoc - 160 into vert
  133.   get PopUpMenu("Art Ideas;Clip Art;Slide Show;(-;Developer Stack 1.1;"& ">90 Icons;(-;Home/H;Work Station;(-;Open Stack", 0, vert, horiz)
  134.   put it into choice
  135.   set hilite of target to false
  136.   if choice = "0" then exit mousedown
  137.  
  138.   if choice = "1" then go to "Art Ideas"
  139.  
  140.   if choice = "2" then go to "Clip Art"
  141.  
  142.   if choice = "3" then go to "Slide Show"
  143.  
  144.   if choice = "5" then go to "Developer Stack 1.1"
  145.  
  146.   if choice = "6" then go to ">90 Icons!!!"
  147.  
  148.   if choice = "8" then go to "Home"
  149.  
  150.   if choice = "9" then go to "WorkStation v3.01"
  151.  
  152.   if choice = "11" then doMenu "Open Stack..."
  153.  
  154. end mousedown
  155.  
  156.  
  157.  
  158.  
  159. -- part 7 (button)
  160. -- low flags: 00
  161. -- high flags: A000
  162. -- rect: left=141 top=308 right=321 bottom=201
  163. -- title width / last selected line: 0
  164. -- icon id / first selected line: 0 / 0
  165. -- text alignment: 1
  166. -- font id: 0
  167. -- text size: 12
  168. -- style flags: 0
  169. -- line height: 16
  170. -- part name: Utils
  171. ----- HyperTalk script -----
  172. on mousedown
  173.   push card
  174.   put (the short name of this stack) into thisStack
  175.   visual dissolve to gray
  176.   visual dissolve
  177.   put the mouseloc into menuLoc
  178.   put item 1 of menuLoc - 140 into horiz
  179.   put item 2 of menuLoc - 260 into vert
  180.   if thisStack ‚↠"Home" then
  181.     get PopUpMenu("ResEdit;Fedit+;MacTools;(-;"& "Rename a File;Delete a File;DeProtect a Stack;ResCopy;"& "(-;Browsing;Typing;Painting;Authoring;Scripting;"& "(-;Quit;Warm Boot", 0, vert, horiz)
  182.     put it into choice
  183.   end if
  184.   if thisStack = "Home" then
  185.     get PopUpMenu("ResEdit;Fedit+;MacTools;(-;"& "(Rename a File;Delete a File;DeProtect a Stack;(ResCopy;"& "(-;Browsing;Typing;Painting;Authoring;Scripting;"& "(-;Quit;Warm Boot", 0, vert, horiz)
  186.     put it into choice
  187.   end if
  188.   set hilite of target to false
  189.   if choice = "0" then exit mousedown
  190.  
  191.   if choice = "1" then open "CMS Hard Disk:Utilities Folder:**CAUTION**Disk Edit stuff:ResEdit1.1b3"
  192.  
  193.   if choice = "2" then open "CMS Hard Disk:Utilities Folder:**CAUTION**Disk Edit stuff:Fedit Plus+"
  194.  
  195.   if choice = "3" then open "CMS Hard Disk:Utilities Folder:**CAUTION**Disk Edit stuff:MacTools‚Ñ¢ 6.4"
  196.  
  197.   if choice = "5" then
  198.     put "Please select a file to rename"
  199.     put filename() into renamethis
  200.     if renamethis is empty then
  201.       hide message window
  202.       beep
  203.       exit mousedown
  204.     end if
  205.     hide message window
  206.  
  207.     put LastPathComponent(renamethis) into shortname
  208.     ask "What do you want to name this file" with shortname
  209.     if it is shortname or it is empty then
  210.       hide message window
  211.       beep
  212.       exit mousedown
  213.     end if
  214.  
  215.     put RenameFile(renamethis,it) into returnedthis
  216.  
  217.     if returnedthis = 0 then
  218.       answer "Everything went just fine"
  219.     else
  220.       if returnedthis < 0 then
  221.         OsErr returnedthis
  222.       else
  223.         answer "Whoops, there was an error"
  224.       end if
  225.     end if
  226.   end if
  227.  
  228.   if choice = "6" then
  229.     put "Please select a file to delete"
  230.     put filename() into deletethis
  231.     if deletethis is empty then
  232.       hide message window
  233.       beep
  234.       exit mouseDown
  235.     end if
  236.     hide message window
  237.  
  238.     answer "Are you sure you want to delete this?" with "Cancel" or "OK"
  239.     if it is "Cancel" then
  240.       beep
  241.       exit mouseDown
  242.     end if
  243.  
  244.     put deletefile(deletethis) into returnedthis
  245.  
  246.     if returnedthis = 0 then
  247.       answer "I hope you were sure, 'cause it's gone!"
  248.     else
  249.       if returnedthis < 0 then
  250.         OsErr returnedthis
  251.       else
  252.         answer "Whoops, there was an error"
  253.       end if
  254.     end if
  255.   end if
  256.  
  257.   if choice = "7" then
  258.     put "Please select a protected stack"
  259.     set cursor to 4
  260.     put filename("STAK") into fname
  261.     if fname is empty then
  262.       hide message window
  263.       exit mousedown
  264.     end if
  265.  
  266.     deprotect fname
  267.  
  268.     if the result is empty
  269.     then answer "Deprotect Successful" with "OK"
  270.   else if the result is -49
  271.   then answer "Sorry, that file is busy."
  272. else if the result is -44
  273. then answer "Sorry, the disk is locked."
  274. else answer "Failed: unexpected file system error: " & the result with "OK"
  275. end if
  276.  
  277. if choice = "8" then resCopy
  278.  
  279. if choice = "10" then set UserLevel to 1
  280.  
  281. if choice = "11" then set UserLevel to 2
  282.  
  283. if choice = "12" then set UserLevel to 3
  284.  
  285. if choice = "13" then set userLevel to 4
  286.  
  287. if choice = "14" then set UserLevel to 5
  288.  
  289. if choice = "16" then
  290.   answer "Quit HyperCard?" with "Finder" or "ShutDown" or "Cancel"
  291.   if it is "Finder" then doMenu "Quit HyperCard"
  292.   if it is "ShutDown" then shutDown
  293.   if it is "Cancel" then exit mouseDown
  294. end if
  295.  
  296. if choice = "17" then
  297.   answer "Re-boot?" with "Restart" or "ShutDown" or "Cancel"
  298.   if it is "Restart" then doRestart
  299.   if it is "ShutDown" then shutDown
  300.   if it is "Cancel" then exit mouseDown
  301. end if
  302.  
  303. end mousedown
  304.  
  305.  
  306.